<?php

/**
 * VstAlumnoPrueba form base class.
 *
 * @method VstAlumnoPrueba getObject() Returns the current form's model object
 *
 * @package    reducars
 * @subpackage form
 * @author     victor
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseVstAlumnoPruebaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'rut'           => new sfWidgetFormInputText(),
      'nombre'        => new sfWidgetFormInputText(),
      'apellidos'     => new sfWidgetFormInputText(),
      'puntaje'       => new sfWidgetFormInputText(),
      'observacion'   => new sfWidgetFormTextarea(),
      'mes_ingreso'   => new sfWidgetFormInputText(),
      'fecha_prueba'  => new sfWidgetFormInputText(),
      'fecha_ingreso' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'rut'           => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'nombre'        => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'apellidos'     => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'puntaje'       => new sfValidatorInteger(array('required' => false)),
      'observacion'   => new sfValidatorString(array('max_length' => 500, 'required' => false)),
      'mes_ingreso'   => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'fecha_prueba'  => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'fecha_ingreso' => new sfValidatorString(array('max_length' => 10, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('vst_alumno_prueba[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'VstAlumnoPrueba';
  }

}
